﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Audio;

namespace DELVE_GAME.ViewStructure.GameActions
{
    class UpgradeSpeedGameAction : GameAction
    {

        PlayStage playStage;
        View view;
        SoundEffectInstance sound;
        public UpgradeSpeedGameAction(View view, PlayStage playStage, SoundEffectInstance sound)
        {
            this.view = view;
            this.playStage = playStage;
            this.sound = sound;
        }

        public override void doAction()
        {
            List<Tile> l = playStage.getSelectedTiles();
            
            view.applyUpgrades(l, (int)UPGRADE_TYPES.SPEED);
            
            playStage.refreshAvailableUpgrades(view.doMove(playStage.getSelectedTiles()));
            sound.Play();
        }
    }
}
